 <?php
 error_reporting(E_ALL & ~E_NOTICE);
 header("Content-type:text/html;charset=utf-8");
 
 $username = $_POST["username"];
 $password=$_POST["password"];
 $emal = $_POST["emal"];
 $phen=$_POST["phen"];
 $re_password=$_POST['repassword'];
 

 if ($password == $re_password) {
	$id=mysqli_connect("localhost","root","");
	mysqli_select_db($id,"my_db");
	$sql="INSERT INTO Persons  VALUES('$username','$password','$emal','$phen')";
	mysqli_query($id,$sql);
	  echo '注册成功';
	  }else{
		  exit("两次密码不一致，请返回上一页");
	  }
	  mysqli_close($id);


echo "<html>";
echo "<head>";
echo "<meta charset='utf-8'>";
echo "<title>COOLIE实现用户登录</title>";
echo "</head>";
echo "<body>";
 echo "</body>";
 echo "<a href='loginym.html'>点击登录吧~</a>";
 echo "</html>";
  ?>